{switch name="vo.type"}
{case value="hidden"}
{if $vo.value}<input type="hidden" class="form-control" name="extra_data[1][{$vo.name}]" value="{$value}">{/if}
{/case}
{case value="text"}
<div class="layui-form-item">
	<label class="" title="{$vo.title}">{$vo.title} {if condition="isset($vo.ifrequire) AND $vo.ifrequire"}&nbsp;<font color="red">*</font>{/if}</label>
	<div class="layui-form-field-label">
		<input type="text" name="extra_data[1][{$vo.name}]" placeholder="请输入{$vo.title}" autocomplete="off" class="layui-input" value="{$value}">
	</div>
	{if $vo.remark}<div class="layui-form-mid layui-word-aux">{$vo.remark|raw}</div>{/if}
</div>
{/case}
{case value="tags"}
<div class="layui-form-item">
	<label class="">{$vo.title} {if condition="isset($vo.ifrequire) AND $vo.ifrequire"}&nbsp;<font color="red">*</font>{/if}</label>
	<div class="layui-form-field-label">
		<input type="text" name="extra_data[1][{$vo.name}]" class="layui-input form-tags tags-{$vo.name}" value="{$value}" data-remark="{$vo.remark|default='输入回车确认'}">
	</div>
	{if $vo.remark}<div class="layui-form-mid layui-word-aux">{$vo.remark|raw}</div>{/if}
</div>
{/case}
{case value="number"}
<div class="layui-form-item">
	<label class="">{$vo.title} {if condition="isset($vo.ifrequire) AND $vo.ifrequire"}&nbsp;<font color="red">*</font>{/if}</label>
	<div class="layui-form-field-label">
		<input type="number" name="extra_data[1][{$vo.name}]" placeholder="请输入{$vo.title}" autocomplete="off" class="layui-input" value="{$value}">
	</div>
	{if $vo.remark}<div class="layui-form-mid layui-word-aux">{$vo.remark|raw}</div>{/if}
</div>
{/case}
{case value="switch"}
<div class="layui-form-item">
	<label class="">{$vo.title} {if condition="isset($vo.ifrequire) AND $vo.ifrequire"}&nbsp;<font color="red">*</font>{/if}</label>
	<div class="layui-form-field-label">
		<input type="checkbox" name="extra_data[1][{$vo.name}]" lay-skin="switch" lay-text="ON|OFF" value="{$vo['value']}" {if 1==$vo['value']}checked=''{/if}> </div> {if $vo.remark}<div
		class="layui-form-mid layui-word-aux">{$vo.remark|raw}</div>{/if}
</div>
{/case}
{case value="array"}
<div class="layui-form-item layui-form-text">
	<label class="">{$vo.title} {if condition="isset($vo.ifrequire) AND $vo.ifrequire"}&nbsp;<font color="red">*</font>{/if}</label>
	<div class="layui-form-field-label fieldlist border-none" data-name="extra_data[1][{$vo.name}]" data-id="{$vo.name}">
		<div class="arrBox"></div>
		<button type="button" class="layui-btn btn-append"><i class="iconfont icon-add"></i> 追加</button>
		<textarea name="extra_data[1][{$vo.name}]" class="layui-textarea layui-hide">{$value}</textarea>
	</div>
	{if $vo.remark}<div class="layui-form-mid layui-word-aux">{$vo.remark|raw}</div>{/if}
</div>
<script type="text/html" id="{$vo.name}Tpl">
	<div class="layui-form-item rules-item">
		{{# layui.each(d.lists, function(index, item) { }}
		<div class="layui-input-block" >
			<input type="text" class="layui-input" name="{{item.name}}[{{item.index}}][key]" placeholder="键" value="{{item.row.key|| ''}}">
		</div>
		<div class="layui-input-block">
			<textarea type="text" class="layui-input" name="{{item.name}}[{{item.index}}][value]" placeholder="值">{{item.row.value|| ''}}</textarea>
		</div>
		<label class="layui-input-button">
			<button type="button" class="layui-btn layui-btn-danger btn-remove layui-btn-xs"><i class="iconfont icon-close"></i></button>
			<button type="button" class="layui-btn btn-dragsort layui-btn-xs"><i class="iconfont icon-yidong"></i></button>
		</label>
		{{# }); }}
	</div>
</script>
{/case}
{case value="checkbox"}
<div class="layui-form-item">
	<label class="">{$vo.title} {if condition="isset($vo.ifrequire) AND $vo.ifrequire"}&nbsp;<font color="red">*</font>{/if}</label>
	<div class="layui-form-field-label">
		{volist name="vo.options" id="v"}
		<input type="checkbox" name="extra_data[1][{$vo.name}][]" lay-skin="primary" title="{$v}" value="{$key}" {if in_array($key,$vo['value'])}checked{/if}>
		{/volist}
	</div>
	{if $vo.remark}<div class="layui-form-mid layui-word-aux">{$vo.remark|raw}</div>{/if}
</div>
{/case}
{case value="radio"}
<div class="layui-form-item">
	<label class="">{$vo.title} {if condition="isset($vo.ifrequire) AND $vo.ifrequire"}&nbsp;<font color="red">*</font>{/if}</label>
	<div class="layui-form-field-label">
		{volist name="vo.options" id="v"}
		<input type="radio" name="extra_data[1][{$vo.name}]" value="{$key}" title="{$v}" {if $key==$vo['value']}checked=''{/if}>
		{/volist}
	</div>
	{if $vo.remark}<div class="layui-form-mid layui-word-aux">{$vo.remark|raw}</div>{/if}
</div>
{/case}
{case value="select"}
<div class="layui-form-item">
	<label class="">{$vo.title} {if condition="isset($vo.ifrequire) AND $vo.ifrequire"}&nbsp;<font color="red">*</font>{/if}</label>
	<div class="layui-form-field-label">
		<select name="extra_data[1][{$vo.name}]">
			<option value=""></option>
			{volist name="vo.options" id="v"}
			<option value="{$key}" {if $key==$vo['value']}selected=""{/if}>{$v} </option>
			{/volist}
		</select>
	</div>
	{if $vo.remark}<div class="layui-form-mid layui-word-aux">{$vo.remark|raw}</div>{/if}
</div>
{/case}
{case value="selects"}
<div class="layui-form-item">
	<label>{$vo.title} {if condition="isset($vo.ifrequire) AND $vo.ifrequire"}&nbsp;<font color="red">*</font>{/if}</label>
	<div class="layui-form-field-label">
		<div class="form-selects" data-name="extra_data[1][{$vo.name}]" data-id="{$vo.name}" data-value="{$vo.value}" data-list="{$vo.options|json_encode}"></div>
	</div>
	{if $vo.remark}<div class="layui-form-mid layui-word-aux">{$vo.remark|raw}</div>{/if}
</div>
{/case}
{case value="selectpage"}
<div class="layui-form-item form-group">
	<label>{$vo.title} {if condition="isset($vo.ifrequire) AND $vo.ifrequire"}&nbsp;<font color="red">*</font>{/if}</label>
	<div class="layui-form-field-label">
		<input class="form-control layui-input selectpage" type="text" name="extra_data[1][{$vo.name}]" data-source="{$vo.options.url|url}" data-multiple="{$vo.options.multiple|default='false'}" data-field="{$vo.options.field|default='name'}" data-primary-key="{$vo.options.key|default='id'}" data-max-select-limit="{$vo.options.max|default='20'}" data-pagination="{$vo.options.pagination|default='true'}" data-page-size="{$vo.options.limit|default='10'}" data-order-by="{$vo.options.order|default='id'}"  value="{$vo.value}">
	</div>
	{if $vo.remark}<div class="layui-form-mid layui-word-aux">{$vo.remark|raw}</div>{/if}
</div>
{/case}
{case value="color"}
<div class="layui-form-item">
	<label class="">{$vo.title} {if condition="isset($vo.ifrequire) AND $vo.ifrequire"}&nbsp;<font color="red">*</font>{/if}</label>
	<div class="layui-form-field-label">
		<div class="layui-input-inline" style="width: 120px;">
			<input type="text" name="extra_data[1][{$vo.name}]" value="{$value}" placeholder="请选择颜色" class="layui-input test-form-input">
		</div>
		<div class="layui-inline" style="left: -11px;">
			<div class="layui-color-box"></div>
		</div>
	</div>
	{if $vo.remark}<div class="layui-form-mid layui-word-aux">{$vo.remark|raw}</div>{/if}
</div>
{/case}
{case value="datetime"}
<div class="layui-form">
	<div class="layui-form-item">
		<label class="">{$vo.title} {if condition="isset($vo.ifrequire) AND $vo.ifrequire"}&nbsp;<font color="red">*</font>{/if}</label>
		<div class="layui-form-field-label">
			<input type="text" class="layui-input datetime" name="extra_data[1][{$vo.name}]" placeholder="请输入{$vo.title}" value="{$value}">
		</div>
		{if $vo.remark}<div class="layui-form-mid layui-word-aux">{$vo.remark|raw}</div>{/if}
	</div>
</div>
{/case}
{case value="textarea"}
<div class="layui-form-item layui-form-text">
	<label class="">{$vo.title} {if condition="isset($vo.ifrequire) AND $vo.ifrequire"}&nbsp;<font color="red">*</font>{/if}</label>
	<div class="layui-form-field-label">
		   <textarea placeholder="请输入{$vo.title}" class="layui-textarea" name="extra_data[1][{$vo.name}]">{$value}</textarea>
	</div>
	{if $vo.remark}<div class="layui-form-mid layui-word-aux">{$vo.remark|raw}</div>{/if}
</div>
{/case}
{case value="image"}
<div class="layui-form-item layui-form-text">
	<label class="">{$vo.title} {if condition="isset($vo.ifrequire) AND $vo.ifrequire"}&nbsp;<font color="red">*</font>{/if}</label>
	<div class="layui-form-field-label border-none">
		<div class="js-upload-image">
			<div id="file_list_{$vo.name}" class="uploader-list">
				{notempty name="$value"}
				<div class="file-item thumbnail">
					<img data-image class="{$vo.name}-{$value}" data-original="{$value|get_file_path|default='__STATIC__/admin/img/none.png'}" src="{$value|get_file_path|default='__STATIC__/admin/img/none.png'}">
					<div class="file-panel">
						<i class="iconfont icon-tailor cropper" data-input-id="{$value}" data-id="{$vo.name}"></i>
						<i class="iconfont icon-trash remove-picture" data-id="{$value}"></i>
					</div>
				</div>
				{/notempty}
			</div>
			<input type="hidden" name="extra_data[1][{$vo.name}]" data-multiple="false" id="{$vo.name}" value="{$value|default=''}">
			<div class="layui-clear"></div>
			<div id="picker_{$vo.name}"><i class="layui-icon layui-icon-upload"></i> 上传单张图片</div>
			<button type="button" class="layui-btn fachoose-image" data-input-id="{$vo.name}" id="fachoose-{$vo.name}"><i class="iconfont icon-other"></i> 选择</button>
		</div>
	</div>
	{if $vo.remark}<div class="layui-form-mid layui-word-aux">{$vo.remark|raw}</div>{/if}
</div>
{/case}
{case value="images"}
<div class="layui-form-item layui-form-text">
	<label class="">{$vo.title} {if condition="isset($vo.ifrequire) AND $vo.ifrequire"}&nbsp;<font color="red">*</font>{/if}</label>
	<div class="layui-form-field-label border-none">
		<div class="js-upload-images">
			<div id="file_list_{$vo.name}" class="uploader-list">
				{notempty name="$value"}
				{volist name="$value|explode=',',###" id="v"}
				<div class="file-item thumbnail">
					<img data-image class="{$vo.name}-{$v}" data-original="{$v|get_file_path}" src="{$v|get_file_path|default='__STATIC__/admin/img/none.png'}">
					<div class="file-panel">
						<i class="iconfont icon-yidong move-picture"></i>
						<i class="iconfont icon-tailor cropper" data-input-id="{$v}" data-id="{$vo.name}"></i>
						<i class="iconfont icon-trash remove-picture" data-id="{$v}"></i>
					</div>
				</div>
				{/volist}
				{/notempty}
			</div>
			<input type="hidden" name="extra_data[1][{$vo.name}]" data-multiple="true" id="{$vo.name}" value="{$value|default=''}">
			<div class="layui-clear"></div>
			<div id="picker_{$vo.name}"><i class="layui-icon layui-icon-upload"></i> 上传多张图片</div>
			<button type="button" class="layui-btn fachoose-image" data-multiple="true" data-input-id="{$vo.name}" id="fachoose-{$vo.name}"><i class="iconfont icon-other"></i> 选择</button>
		</div>
	</div>
	{if $vo.remark}<div class="layui-form-mid layui-word-aux">{$vo.remark|raw}</div>{/if}
</div>
{/case}
{case value="file"}
<div class="layui-form-item layui-form-text">
	<label class="">{$vo.title} {if condition="isset($vo.ifrequire) AND $vo.ifrequire"}&nbsp;<font color="red">*</font>{/if}</label>
	<div class="layui-form-field-label border-none">
		<div class="js-upload-file">
			<div id="file_list_{$vo.name}" class="uploader-list">
				<table class="layui-table">
					<colgroup>
						<col width="150">
						<col width="150">
						<col width="150">
						<col>
					</colgroup>
					<thead>
					<tr>
						<th>文件名称</th>
						<th>提示</th>
						<th>进度</th>
						<th>操作</th>
					</tr>
					</thead>
					<tbody class="file-box">
					{notempty name="$value"}
					<tr class="file-item">
						<td>{$value|get_file_name}</td>
						<td>/</td>
						<td>/</td>
						<td>
							<a href="{$vo.value|get_file_path}" class="layui-btn download-file layui-btn layui-btn-xs">下载</a>
							<a href="javascript:void(0);" class="layui-btn remove-file layui-btn layui-btn-xs layui-btn-danger">删除</a>
						</td>
					</tr>
					{/notempty}
					</tbody>
				</table>
			</div>
			<input type="hidden" name="extra_data[1][{$vo.name}]" data-multiple="false" data-size="{:config('upload_file_size')}" data-ext="{:config('upload_file_ext')}" id="{$vo.name}" value="{$value|default=''}">
			<div id="picker_{$vo.name}"><i class="layui-icon layui-icon-upload"></i> 上传单个文件</div>
		</div>
	</div>
</div>
{/case}
{case value="files"}
<div class="layui-form-item layui-form-text">
	<label class="">{$vo.title} {if condition="isset($vo.ifrequire) AND $vo.ifrequire"}&nbsp;<font color="red">*</font>{/if}</label>
	<div class="layui-form-field-label border-none">
		<div class="js-upload-file">
			<div id="file_list_{$vo.name}" class="uploader-list">
				<table class="layui-table">
					<colgroup>
						<col width="150">
						<col width="150">
						<col width="150">
						<col>
					</colgroup>
					<thead>
					<tr>
						<th>文件名称</th>
						<th>提示</th>
						<th>进度</th>
						<th>操作</th>
					</tr>
					</thead>
					<tbody class="file-box">
					{notempty name="$value"}
					{volist name="$value|explode=',',###" id="v"}
					<tr class="file-item">
						<td>{$v|get_file_name}</td>
						<td>/</td>
						<td>/</td>
						<td>
							<a href="{$v|get_file_path}" class="layui-btn download-file layui-btn layui-btn-xs">下载</a>
							<a href="javascript:void(0);" class="layui-btn remove-file layui-btn layui-btn-xs layui-btn-danger" data-id="{$v}">删除</a>
						</td>
					</tr>
					{/volist}
					{/notempty}
					</tbody>
				</table>
			</div>
			<input type="hidden" name="extra_data[1][{$vo.name}]" data-multiple="true" data-size="{:config('upload_file_size')}" data-ext="{:config('upload_file_ext')}" id="{$vo.name}" value="{$value|default=''}">
			<div id="picker_{$vo.name}"><i class="layui-icon layui-icon-upload"></i> 上传多个文件</div>
		</div>
	</div>
</div>
{/case}
{case value="Ueditor"}
<div class="layui-form-item layui-form-text">
	<label title="{$vo.title}">{$vo.title} {if condition="isset($vo.ifrequire) AND $vo.ifrequire"}&nbsp;<font color="red">*</font>{/if}</label>
	<div class="layui-form-field-label border-none">
		<div class="edit">
			<script type="text/plain" class="js-ueditor" id="{$vo.name}1" name="extra_data[1][{$vo.name}]"> {$value|raw}</script>
		</div>
		<div class="{$vo.name}_attr editor_tool">
			<a class="layui-btn layui-btn-sm" id="{$vo.name}1grabimg" style="margin-top: 4px;">图片本地化</a>
			<a class="layui-btn layui-btn-sm" id="{$vo.name}1filterword" style="margin-top: 4px;">检测违禁词</a>
		</div>
	</div>
	{if $vo.remark}<div class="layui-form-mid layui-word-aux">{$vo.remark|raw}</div>{/if}

</div>
{/case}
{case value="city"}
<div class="layui-form-item layui-form-text">
	<label>{$vo.title} {if condition="isset($vo.ifrequire) AND $vo.ifrequire"}&nbsp;<font color="red">*</font>{/if}</label>
	<div class="layui-form-field-label">
		<input type="text" autocomplete="on" class="layui-input" name="{$vo.fieldArr}[{$vo.name}]" id="{$vo.name}" value="{$vo.value}" data-toggle="city-picker" placeholder="请选择"/>
	</div>
	{if $vo.remark}<div class="layui-form-mid layui-word-aux">{$vo.remark|raw}</div>{/if}
</div>
{/case}
{case value="markdown"}
{:hook('markdown',$vo)}
{/case}
{/switch}